package com.dragon.modules.yuegou.service.live;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dragon.common.web.PageRequest;
import com.dragon.modules.yuegou.entity.live.BroadcastEntity;
import com.dragon.modules.yuegou.model.live.Broadcast;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * 直播间信息表 服务接口
 *
 * @author ZSH
 * @date 2020-06-05 17:40:15
 * @version 2.0
 */
public interface BroadcastService extends IService<BroadcastEntity> {

	/**
	 * <p>分页查询直播列表</p>
	 * @param page 分页信息
	 * @param name 分页名称
	 * @param roomId 直播间Id
	 * @return
	 */
	IPage<Broadcast> search(PageRequest page, String name, String roomId, String busdId);

	/**
	 * <p>添加直播间</p>
	 * @param broadcast 直播信息
	 */
	void saveBroa(Broadcast broadcast);

	/**
	 * <p>删除直播间</p>
	 * @param broadcastId
	 */
	void deleteBroa(String broadcastId);

	/**
	 * <p>生成开播码</p>
	 * @param broadcastId
	 * @param busdId
	 */
	String generateCode(String broadcastId,String busdId);

	/**
	 * <p>查询直播详情</p>
	 * @param broadcastId
	 * @return
	 */
	Broadcast broadDetails(String broadcastId);

	/**
	 * <p>上传微信图片</p>
	 * @param file
	 * @param busdId
	 */
	String wxUpload(MultipartFile file, String busdId);

	/**
	 * <p>同步所有直播间的直播状态</p>
	 */
	void synLiveStatus();


	List<String> busdIds();
}